﻿Public Class Form1

    Property Page As New page

    Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
        MyBase.OnLoad(e)
        DoubleBuffered = True
        Dim S As String = ""
        S =
            "<table cellpadding=4 cellspacing=2 width=100% height=100%>" &
            "<tr><td align=right width=100>Kimlik no. :</td><td width=100>146835</td><td align=right width=100>Adı soyadı :</td><td colspan=3>Ahmet Demirağ</td></tr>" &
            "<tr><td align=right>Sigorta no. :</td><td>1028884</td><td align=right>Doğum tar. :</td><td width=100>17/04/1972</td><td align=right width=100>İlk.sig.tar. :</td><td width=100>01/09/2006</td></tr>" &
            "<tr height=100%><td>test</td><td colspan=5>" &
            "<table width=100% cellpadding=4 cellspacing=2 bgcolor=c0c000>" &
            "<tr><td>test edgh dfghdfhdfgh dfgh dfghdf ghdfghdf dgh f gh fghfh dgdfg dfghdfgh dfgh dgh dh fgh dfgh dfgh</td></tr>" &
            "</table>" &
            "</td></tr>" &
            "</table>"
        '"<tr><td align=right>Kimlik no. :</td><td>146835</td><td align=right>Adı soyadı :</td><td colspan=3>Ahmet Demirağ</td></tr>" &
        '"<tr><td align=right>Sigorta no. :</td><td>1028884</td><td align=right>Doğum tar. :</td><td>17/04/1972</td><td align=right>İlk.sig.tar. :</td><td>01/09/2006</td></tr>" &
        Page.Inside = S
        Page.windowsize = New Size(ClientRectangle.Width - 1, ClientRectangle.Height)
        Page.resize()
    End Sub

    Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
        MyBase.OnPaint(e)
        Page.Draw(e.Graphics, New Point(0, 0))
    End Sub

    Protected Overrides Sub OnResize(ByVal e As System.EventArgs)
        MyBase.OnResize(e)
        Page.windowsize = New Size(ClientRectangle.Width - 1, ClientRectangle.Height)
        Page.resize()
        Invalidate()
    End Sub

End Class